<!DOCTYPE html>
<html lang="en">

<head>
    <!-- BEGIN META -->
    {include file="public/meta"}
    <!-- END META -->

    <!-- BEGIN STYLESHEET-->
    {include file="public/css"}
    <!-- END STYLESHEET-->

    <title>
        {$current_menu['title']} - {$yun_config.title}
    </title>
</head>

<body>
<!-- BEGIN SECTION -->
<section id="container">
    <!-- BEGIN HEADER -->
    {include file="public/header"}
    <!-- END HEADER -->
    <!-- BEGIN SIDEBAR -->
    {include file="public/sidebar"}
    <!-- END SIDEBAR -->
    <!-- BEGIN MAIN CONTENT -->
    <section id="main-content">
        <!-- BEGIN WRAPPER  -->
        <section class="wrapper z-index-1">
            <!-- TOP MENU ROW  -->
            {include file="public/top_menu"}
            <!-- TOP MENU ROW  -->

            <!-- BEGIN ROW  -->
            <div class="row">
                <div class="col-lg-12">
                    <section class="panel">
                        <header class="panel-heading">
                            <span class="label label-primary">{$current_menu.title}</span>
                            <span class="tools pull-right"> </span>
                        </header>
                        <div class="panel-body">
                            <!-- BTN GROUP-->
                            <div class="clearfix">
                                <div class="btn-group pull-left">
                                    <a href="{:url('add')}" class="btn btn-success green">
                                        <i class="fa fa-plus"></i> 新增配置
                                    </a>
                                </div>
                            </div>
                            <!-- END BTN GROUP -->
                            <table class="table table-striped table-advance table-hover">
                                <thead>
                                <tr>
                                    <th class="text-center"><i class="fa fa-list "></i> ID </th>
                                    <th class="text-center"><i class="fa fa-edit "></i> 名称 </th>
                                    <th class="text-center hidden-phone"><i class="fa fa-book"></i> 标题 </th>
                                    <!--<th class="text-center hidden-phone"><i class="fa fa-sitemap "></i> 所属分组 </th>-->
                                    <!--<th class="text-center hidden-phone"><i class="fa fa-ban"></i> 状态 </th>-->
                                    <th class="text-center hidden-phone"><i class="fa fa-clock-o "></i> 发布时间 </th>
                                    <th class="text-center"><i class="fa fa-calendar-o "></i> 操作 </th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="config_list" id="item"}
                                <tr>
                                    <td class="text-center">{$item.id}</td>
                                    <td class="text-center">{$item.name}</td>
                                    <td class="text-center hidden-phone">{$item.title}</td>
                                    <!--<td class="text-center hidden-phone">{$item.group}</td>-->
                                    <!--<td class="text-center hidden-phone">-->
                                        <!--{if condition="$item['status'] eq 1"}-->
                                        <!--<span class="label label-danger">禁用</span>-->
                                        <!--{else /}<span class="label label-success">正常</span>-->
                                        <!--{/if}-->
                                    <!--</td>-->
                                    <td class="text-center hidden-phone">{$item.create_time}</td>
                                    <td class="text-center">
                                        <a href="{:url('edit',['id'=>$item.id])}" class="btn btn-primary btn-xs" title="修改">
                                            <li class="fa fa-pencil"></li>
                                        </a>
                                        {eq name="$item.is_allow_del" value="1"}
                                            <a val="{:url('del',['id'=>$item.id])}" class="btn btn-danger btn-xs del" title="删除">
                                                <li class="fa fa-trash-o"></li>
                                            </a>
                                        {/eq}
                                    </td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table>
                            <!-- PAGE INFO ROW-->
                            <div class="text-right m-r-15">
                                {$list->render()|raw}
                            </div>
                            <!-- END PAGE INFO -->
                        </div>
                    </section>
                </div>
            </div>
            <!-- END ROW  -->
        </section>
        <!-- END WRAPPER  -->
    </section>
    <!-- END MAIN CONTENT -->
    <!-- BEGIN FOOTER -->
    {include file="public/footer"}
    <!-- END FOOTER -->
</section>
<!-- END SECTION -->
<!-- BEGIN JS -->
{include file="public/js"}
<!-- INLINE JS RELATED TO THIS PAGE -->
<script type="text/javascript">
    $(function() {
        $(".del").click(function() {
            var url = $(this).attr('val');
            layer.confirm('确定要删除此配置项吗？', {
                btn: ['确定', '取消'] //按钮
            }, function() {
                window.location.href = url;
            }, function() {});
        });
    });
</script>
<!-- END JS -->
</body>

</html>